<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script language="javascript">
        function run1() {
            var num;
            num=prompt("请出拳【0-剪刀 1-石头 2-布】");
            let res = Math.floor(Math.random()*3);
            if (res > num) {
                alert("你还太嫩了")
            }else if (res < num) {
                alert("我靠，你居然赢了！")
            }else {
                alert("哎呦不错，平分秋色")
            }
            var i1=document.getElementById("people");
            i1.src=num+".png";
            var i2=document.getElementById("computer");
            i2.src=res+".png";
        }
    </script>
</head>
<body onload="run1()">
<a>玩家出拳：</a>
<img id="people" src=""><br>
<a>电脑出拳：</a>
<img id="computer" src="">
</body>
</html>